]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspaceThumbnail: initialize porthole based on workArea
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 19 Jan 2018 16:37:20 +0000 (17:37 +0100)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 13 Apr 2018 21:59:51 +0000 (16:59 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=792687

js/ui/workspaceThumbnail.js

index 3dffd12813610eefca0f8d8b9d2f23352a507cf6..c1b4bddc66754532263bc99d23230849a7a3bd17 100644 (file)
@@ -275,8 +275,8 @@ var WorkspaceThumbnail = new Lang.Class({
 
         this._createBackground();
 
-        let monitor = Main.layoutManager.primaryMonitor;
-        this.setPorthole(monitor.x, monitor.y, monitor.width, monitor.height);
+        let workArea = Main.layoutManager.getWorkAreaForMonitor(this.monitorIndex);
+        this.setPorthole(workArea.x, workArea.y, workArea.width, workArea.height);
 
         let windows = global.get_window_actors().filter(actor => {
             let win = actor.meta_window;
@@ -321,8 +321,6 @@ var WorkspaceThumbnail = new Lang.Class({
     },
 
     setPorthole(x, y, width, height) {
-        this._portholeX = x;
-        this._portholeY = y;
         this.actor.set_size(width, height);
         this._contents.set_position(-x, -y);
     },